<template>
  <el-dialog
    :title="title"
    :visible.sync="dialogFormVisible"
    :close-on-click-modal="false"
    custom-class="dialog-my"
  >
    <el-descriptions title="基本信息">
      <el-descriptions-item label="姓名">{{
        record.memberName
      }}</el-descriptions-item>
      <el-descriptions-item label="手机号">{{
        record.phone
      }}</el-descriptions-item>
      <el-descriptions-item label="开卡时间">{{
        record.createTime
      }}</el-descriptions-item>
      <el-descriptions-item label="照片">
        <el-image
          style="width: 100px; height: 100px"
          :src="record.picUrl"
          :preview-src-list="[record.picUrl]"
        >
        </el-image>
      </el-descriptions-item>
    </el-descriptions>
    <el-descriptions title="卡信息">
      <el-descriptions-item label="卡类型">畅玩卡</el-descriptions-item>
      <el-descriptions-item label="卡名称">{{
        record.cardName
      }}</el-descriptions-item>
      <el-descriptions-item label="售价">{{
        record.salePrice
      }}</el-descriptions-item>
      <el-descriptions-item label="场次类型">
        {{ setCard(record.cardType) }}
      </el-descriptions-item>
      <el-descriptions-item label="剩余天数">{{
        record.plusDate
      }}</el-descriptions-item>
      <el-descriptions-item label="使用时段">{{
        record.dailyCardDateStr
      }}</el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="submit">确 定</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { playCardSave, regionPageList } from '@/config/api'
import { times, divide } from '@/utils/tools'
export default {
  data () {
    return {
      dialogFormVisible: false,
      title: '详情',
      record: {}

    }
  },
  methods: {
    addShow (e) {
      console.log(e)
      this.record = e
      this.dialogFormVisible = true

    },

    submit () {
      this.dialogFormVisible = false
    },
    setCard (type) {
      let str = ""
      switch (type) {
        case "0":
          str = "全天"
          break;
        case "1":
          str = "早"
          break;
        case "2":
          str = "中"
          break;
        case "3":
          str = "晚"
          break;
      }
      return str
    }

  }
}
</script>
<style>
</style>